package a.oschina.observedemo.demo5;

import java.lang.reflect.InvocationTargetException;

/**
 * &lt;功能详细描述&gt;
 *
 * @author Administrator
 * @version [版本号, 2018/10/23]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class Girl extends Notifier {
    private String action;

    @Override
    public void setAction(String action) {
        this.action = action;
    }

    @Override
    public void notifyObserver(Object object) {
        if (update != null) {
            try {
                update.invoke(object, action);
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            } catch (InvocationTargetException e) {
                e.printStackTrace();
            }
        }
    }
}
